print('... baseMap.lua ...')
baseMap = {}

for i = 1 , 9 do
	baseMap[i] = {1,1,1,1,1,1,1,1}
end

baseWall = {}

for i = 1 , 9 do
	baseWall[i] = {0,0,0,0,0,0,0,0}
end

baseMap[5] = {0,0,1,1,1,1,0,0}
baseWall[5] = {0,0,1,1,1,1,0,0}

baseSytle = {1,2,3,4,[10]=10}

--标记下落里，哪些可左右移动，{canLeft,canRight}
--只有在墙或者非地图的同行才有可能能左右移动
baseCanTurnMap = {
	{{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}},
	{{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}},
	{{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}},
	{{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}},
	{{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}},
	{{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}},
	{{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}},
	{{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}},
	{{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}}
}



function checkBaseCanTurnMap()
	for row=2,9 do
		for col=1,8 do
			if baseMap[row][col]==0 or baseWall[row][col]==1 then 		--墙或者非地图位置
				--判断边左是否非墙或者非空，如果是，则当前点可左移，所有经过该点的精灵，结果移动时要判断并左移
				if col> 1 and baseMap[row][col-1]==1 and baseWall[row][col-1]==0 then   --是否为有效点
					baseCanTurnMap[row][col-1][2] = 1
				end
				--判断右是否非墙或者非空，如果是，则当前点可右移，所有经过该点的精灵，结果移动时要判断并右移
				if col<8 and baseMap[row][col+1]==1 and baseWall[row][col+1]==0 then   --是否为有效点
					baseCanTurnMap[row][col+1][1] = 1
				end
			end
		end
	end
end

baseWallBackup = clone(baseWall)
baseCanTurnMapBackup = clone(baseCanTurnMap)

checkBaseCanTurnMap()
